function [f, P1] = fft_calc(data, fs, L)
Y = fft(data);
P2 = abs(Y/L);
P1 = P2(1:L/2+1);
f = fs*(0:L/2)/L;

